<template>
	<div class="home-item">
	    <h2 @click="dd">{{homeData.message}}</h2>
		<i class="el-icon-edit"></i>
		<i class="el-icon-share"></i>
		<i class="el-icon-delete"></i>
		<el-button type="primary" @click="change">通信</el-button>
	</div>
</template>
<script>
	export default{
		created() {
        },
        props:{
        	homeData:{
        		type:Object
        	}
        },
		data(){
			return{
				msg:'这是主页面的子页面'
			}
		},
		methods:{
			dd:function(){
				this.homeData.message="父组件被子组件修改了";
			},
			change(){
				this.$emit('increment');
			},
			add(){
				alert('父组件调用了')
			}
		},
		mounted(){
			 // console.log(this.$refs.test.innerHTML)
			 // console.log(this.$parent)
		}
	}
</script>
<style lang="less" scoped>
	.home-item{
		border:red 1px solid;
		width:100%;
		box-sizing:border-box;
		margin:0 auto;
	}
</style>
</style>